# 输出二维数组
def show2d(b):
    for i in range(len(b)):
        for j in range(len(b[i])):
            print(b[i][j], end=" ")
        print()


# 创建一个二维数组 行数row,列数为col
def create2d(row, col):
    b = []
    for i in range(row):
        b.append(list([0] * col))
    return b


def main():
    n = int(input())
    b = create2d(n, n)
    for i in range(n):
        b[i] = list(map(int, input().strip().split()))

    s = 0
    for i in range(n):
        for j in range(n):
            if i == j or i + j == n - 1:
                s += b[i][j]
    print(s)


main()
